/**
 * base64 转 字符串
 * @param {String} base64Str
 */
export function base64ToString(base64Str) {
  const strBuff = new Buffer(base64Str, 'base64')
  const str = strBuff.toString('utf8')
  return str
}

/**
 * 字符串 转 base64
 * @param {String} string
 */
export function stringToBase64(string) {
  const strBuff = new Buffer(string)
  const strBase64 = strBuff.toString('base64')
  return strBase64
}
